package com.sicnu.resources.service;

import com.qcloud.cos.model.COSObjectSummary;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.List;

/**
 * @author 怨九己
 */
public interface CosService {
    String uploadObject(
            String bucketName,
            String key,
            MultipartFile file) throws IOException;
    void deleteObject(
            String bucketName,
            String key);
    URL generatePresignedUrl(
            String bucketName,
            String key);
    List<COSObjectSummary> searchObjects(
            String bucketName,
            String key);

    String uploadLargeFile(
            String bucketName,
            String key,
            File file) throws IOException;
}